#!/bin/sh

if command -v node > /dev/null
then
    NODECMD=node
elif command -v nodejs > /dev/null
then
    NODECMD=nodejs
else
    echo "Node.js is not installed!" >& 2
    exit 1
fi

$NODECMD "@CMAKE_INSTALL_PREFIX@/@MAXSCALE_SHAREDIR@/maxctrl/maxctrl.js" "$@"
